
<link rel="stylesheet" href="php-txt-db-api.css" type="text/css">

<title>Error Handling</title>
<div align="center"> 
  <h1 align="left"> Error Handling</h1>
  <h2 align="left"> General </h2>
  <div align="left"> 
    <p> With the settings PRINT_ERRORS and PRINT_WARNINGS (in the file const.php) 
      you can control if errors are printed.<br>
      Independent of this settings the Text-Db-Api manages an error stack. This 
      is an array which contains all errors.<br>
      To do this, the Text-Db-Api sets its own PHP error handler. This error handler 
      catches all errors and stores<br>
      them in the error stack and depending on the configuration these errors 
      are printed out or not.<br>
      The error handler is set in the executeQuery() function and removed at the 
      end of this function. <br>
      Also, each time you call executeQuery() the error stack will be cleared, 
      this has the adventage that you <br>
      only have errors of the last executeQuery() call in the stack.</p>
    <p>With the following functions you can query errors and clear the stack:</p>
    <p><a href="functions/txtdbapi_clear_errors.html">txtdbapi_clear_errors</a><br>
      <a href="functions/txtdbapi_error_occurred.html">txtdbapi_error_occurred</a><br>
      <a href="functions/txtdbapi_get_errors.html">txtdbapi_get_errors</a><br>
      <a href="functions/txtdbapi_get_last_error.html">txtdbapi_get_last_error</a><br>
      <br>
      <br>
    </p>
    <p>Its also important to mention that the Text-Db-Api error handler also catches 
      an stores all PHP Errors <br>
      (which occur in executeQuery) in the stack. So if you set PRINT_ERRORS and 
      PRINT_WARNINGS to 0, you <br>
      should not see any error messages which occur in executeQuery().</p>
    </div>
  <p align="left">&nbsp;</p>
  <div align="left">
    <div align="left">
      <div align="left"></div>
      
    </div>
  </div>
</div>
